import React,{Component} from 'react';
import ModelSearch from './ModelSearch';
import ListSearch from './ListSearch';

//showType:以什么形式展现model:表单弹出框　list:列表框
//cloumn:检索配置
/*cloumn:{
    label:string,检索标题，
    type:{　
        input://输入框
        inputNumber://数字输入框
        cascader://级联选择框
        select://下拉选择框
        datepickerDate://日期选择框
        datepickerMonth://月份选择框
        datepickerRange://日期范围选择框
    }
}*/

const SearchBox = (data) =>{
    const {showType,searchColumn} = data;
    switch (showType){
        case "list":
            return (<ListSearch {...searchColumn}/>)
        case "model":
            return (<ModelSearch {...searchColumn}/>)
        default:
            return false;
    }
}
export default SearchBox;